package cn.wolfcode.crm.web.controller;

import cn.wolfcode.crm.query.FailPlanListQueryObject;
import cn.wolfcode.crm.service.IFailPlanListService;
import cn.wolfcode.crm.util.PageResult;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("failplanlist")
public class FailPlanListController {
    @Autowired
    private IFailPlanListService failplanlistService;

    @RequestMapping("view")
    @RequiresPermissions(value = {"failplanlist:view", "开发失败客户页面"}, logical = Logical.OR)
    public String view() {
        return "client/failplanlist";
    }

    @RequestMapping("list")
    @ResponseBody
    public PageResult list(FailPlanListQueryObject qo) {
        return failplanlistService.list(qo);
    }
}
